package com.ibeeking.found.msg.rest.service.impl;

import com.ibeeking.found.msg.rest.service.IWxMpGroupMessageObjectService;
import com.ibeeking.found.msg.service.common.dos.WxMpGroupMessageObjectDO;
import com.ibeeking.found.msg.service.mapper.WxMpGroupMessageObjectMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;

@Service
public class WxMpGroupMessageObjectServiceImpl extends ServiceImpl<WxMpGroupMessageObjectMapper, WxMpGroupMessageObjectDO> implements IWxMpGroupMessageObjectService {

    @Resource
    private WxMpGroupMessageObjectMapper wxMpGroupMessageObjectMapper;

    @Override
    public Boolean insertBatchSomeColumn(List<WxMpGroupMessageObjectDO> odos) {
        odos.stream().forEach(d->{
            d.setCreateTime(LocalDateTime.now());

        });
        return this.wxMpGroupMessageObjectMapper.insertBatchSomeColumn(odos) == odos.size();
    }
}
